package bairui.international.model.type;

/**
 *
 * (用户类型)Type_User
 */
@com.lianjing.sh.processing.info.annotation.GenerateInfoModel
@com.lianjing.sh.model.common.annotation.Comment("用户类型")
@com.lianjing.sh.processing.info.annotation.InfoComment("用户类型")
public enum Type_User implements com.sh_lianjing.standard.EnumCommentable<Type_User> {

	/**
	 * (普通用户)General</br>
	 */
	@com.lianjing.sh.model.common.annotation.Comment("普通用户")
	@com.lianjing.sh.processing.info.annotation.InfoComment("普通用户")
	General("普通用户")
,
	/**
	 * (内部销售)Saler</br>
	 */
	@com.lianjing.sh.model.common.annotation.Comment("内部销售")
	@com.lianjing.sh.processing.info.annotation.InfoComment("内部销售")
	Saler("内部销售")
,
	/**
	 * (经销商)Agent</br>
	 */
	@com.lianjing.sh.model.common.annotation.Comment("经销商")
	@com.lianjing.sh.processing.info.annotation.InfoComment("经销商")
	Agent("经销商")
,
	/**
	 * (招商经理)Partner</br>
	 */
	@com.lianjing.sh.model.common.annotation.Comment("招商经理")
	@com.lianjing.sh.processing.info.annotation.InfoComment("招商经理")
	Partner("招商经理")
,
	/**
	 * (合伙人)StrategyPartner</br>
	 */
	@com.lianjing.sh.model.common.annotation.Comment("合伙人")
	@com.lianjing.sh.processing.info.annotation.InfoComment("合伙人")
	StrategyPartner("合伙人")
;

	private static java.util.Map<String, Type_User> Cache = new java.util.HashMap<>();
	static{
		for(Type_User enumItem : Type_User.values()){
			Cache.put(enumItem.getComment(), enumItem);
		}
	}

	private String comment;

	private Type_User(String comment){
		this.comment = comment;
	}

	@Override
	public String toString() {
		return comment;
	}

	@Override
	public String getComment() {
		return comment;
	}

	@Override
	public Type_User parseByComment(String comment) {
		return Type_User.parse(comment);
	}

	public static Type_User parse(String comment) {
		Type_User enumItem = Cache.get(comment);
		if(null == enumItem){
			 throw new com.sh_lianjing.standard.exception.EnumCommentableException(Type_User.class, comment);
		}
		return enumItem;
	}

}
